/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author usuario
 */
@Embeddable
public class PagoclientePK implements Serializable {
    @Basic(optional = false)
    @Column(name = "nropago")
    private int nropago;
    @Basic(optional = false)
    @Column(name = "idventa")
    private String idventa;

    public PagoclientePK() {
    }

    public PagoclientePK(int nropago, String idventa) {
        this.nropago = nropago;
        this.idventa = idventa;
    }

    public int getNropago() {
        return nropago;
    }

    public void setNropago(int nropago) {
        this.nropago = nropago;
    }

    public String getIdventa() {
        return idventa;
    }

    public void setIdventa(String idventa) {
        this.idventa = idventa;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nropago;
        hash += (idventa != null ? idventa.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PagoclientePK)) {
            return false;
        }
        PagoclientePK other = (PagoclientePK) object;
        if (this.nropago != other.nropago) {
            return false;
        }
        if ((this.idventa == null && other.idventa != null) || (this.idventa != null && !this.idventa.equals(other.idventa))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.PagoclientePK[ nropago=" + nropago + ", idventa=" + idventa + " ]";
    }
    
}
